﻿<Window x:Class="MoPlus.SolutionBuilder.WpfClient.UserControls.OKDialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:mod="clr-namespace:MoPlus.Interpreter.BLL.Interpreter;assembly=MoPlus.Interpreter"
			 xmlns:ir="clr-namespace:Irony.Interpreter.Ast;assembly=Irony"
			 xmlns:lib="clr-namespace:MoPlus.SolutionBuilder.WpfClient.Library" Topmost="True"
             xmlns:Settings="clr-namespace:MoPlus.SolutionBuilder.WpfClient.Library;assembly=MoPlus.SolutionBuilder.WpfClient"
             Title="{Binding Title}" mc:Ignorable="d"
			 SizeToContent="WidthAndHeight"
			 d:DesignHeight="50" d:DesignWidth="50" MaxWidth="800" MaxHeight="700">
	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="../Resources/Theme.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Window.Resources>
	<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
		<Grid Background="{StaticResource ControlBackgroundBrush}" RenderTransformOrigin="0.5,0.5">
			<Grid.LayoutTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="{Binding Source={x:Static Settings:UserSettingsHelper.Instance}, Path=ControlSize, Mode=TwoWay}"
					                        ScaleY="{Binding Source={x:Static Settings:UserSettingsHelper.Instance}, Path=ControlSize, Mode=TwoWay}"/>
				</TransformGroup>
			</Grid.LayoutTransform>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"></RowDefinition>
				<RowDefinition Height="Auto"></RowDefinition>
			</Grid.RowDefinitions>
			<TextBlock Margin="4" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Text="{Binding Text, Mode=OneWay}" />
		<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="2">
			<Button Padding="10,5,10,5" Command="{Binding CloseCommand}" Content="{Binding OKButtonLabel}"></Button>
		</StackPanel>
	</Grid>
	</ScrollViewer>
</Window>
